home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / axctrls.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  30.6 KB  |  784 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'AxCtrls.pas' rev: 3.00
  6.  
  7. #ifndef AxCtrlsHPP
  8. #define AxCtrlsHPP
  9. #include <Menus.hpp>
  10. #include <StdVCL.hpp>
  11. #include <ExtCtrls.hpp>
  12. #include <Forms.hpp>
  13. #include <Controls.hpp>
  14. #include <Graphics.hpp>
  15. #include <Classes.hpp>
  16. #include <ComObj.hpp>
  17. #include <SysUtils.hpp>
  18. #include <ActiveX.hpp>
  19. #include <Messages.hpp>
  20. #include <Windows.hpp>
  21. #include <SysInit.hpp>
  22. #include <System.hpp>
  23.  
  24. //-- user supplied -----------------------------------------------------------
  25.  
  26. #include <objsafe.h>
  27.  
  28.  
  29. namespace Axctrls
  30. {
  31. //-- type declarations -------------------------------------------------------
  32. class DELPHICLASS TOleStream;
  33. class PASCALIMPLEMENTATION TOleStream : public Classes::TStream 
  34. {
  35.     typedef Classes::TStream inherited;
  36.     
  37. private:
  38.     _di_IStream FStream;
  39.     
  40. public:
  41.     __fastcall TOleStream(const _di_IStream Stream);
  42.     virtual int __fastcall Read(void *Buffer, int Count);
  43.     virtual int __fastcall Write(const void *Buffer, int Count);
  44.     virtual int __fastcall Seek(int Offset, Word Origin);
  45. public:
  46.     /* TObject.Destroy */ __fastcall virtual ~TOleStream(void) { }
  47.     
  48. };
  49.  
  50. class DELPHICLASS TAggregatedObject;
  51. class PASCALIMPLEMENTATION TAggregatedObject : public System::TObject 
  52. {
  53.     typedef System::TObject inherited;
  54.     
  55. private:
  56.     void *FController;
  57.     _di_IUnknown __fastcall GetController(void);
  58.     
  59. protected:
  60.     HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);
  61.     int __stdcall _AddRef(void);
  62.     int __stdcall _Release(void);
  63.     
  64. public:
  65.     __fastcall TAggregatedObject(_di_IUnknown Controller);
  66.     __property _di_IUnknown Controller = {read=GetController};
  67. public:
  68.     /* TObject.Destroy */ __fastcall virtual ~TAggregatedObject(void) { }
  69.     
  70. };
  71.  
  72. class DELPHICLASS TContainedObject;
  73. class PASCALIMPLEMENTATION TContainedObject : public Axctrls::TAggregatedObject 
  74. {
  75.     typedef Axctrls::TAggregatedObject inherited;
  76.     
  77. private:
  78.     void *__IUnknown;    /* IUnknown */
  79.     
  80. public:
  81.     operator IUnknown*(void) { return (IUnknown*)&__IUnknown; }
  82.     
  83. protected:
  84.     HIDESBASE virtual HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);
  85. public:
  86.     /* TAggregatedObject.Create */ __fastcall TContainedObject(_di_IUnknown Controller) : Axctrls::TAggregatedObject(
  87.         Controller) { }
  88.     
  89. public:
  90.     /* TObject.Destroy */ __fastcall virtual ~TContainedObject(void) { }
  91.     
  92. };
  93.  
  94. typedef void __fastcall (__closure *TConnectEvent)(const _di_IUnknown Sink, bool Connecting);
  95.  
  96. enum TConnectionKind { ckSingle, ckMulti };
  97.  
  98. class DELPHICLASS TConnectionPoint;
  99. class DELPHICLASS TConnectionPoints;
  100. class PASCALIMPLEMENTATION TConnectionPoints : public Axctrls::TAggregatedObject 
  101. {
  102.     typedef Axctrls::TAggregatedObject inherited;
  103.     
  104. private:
  105.     void *__IConnectionPointContainer;    /* IConnectionPointContainer */
  106.     
  107. public:
  108.     operator IConnectionPointContainer*(void) { return (IConnectionPointContainer*)&__IConnectionPointContainer; }
  109.         
  110.     
  111. private:
  112.     Classes::TList* FConnectionPoints;
  113.     
  114. protected:
  115.     HRESULT __stdcall EnumConnectionPoints(/* out */ _di_IEnumConnectionPoints &enumconn);
  116.     HRESULT __stdcall FindConnectionPoint(const GUID &iid, /* out */ _di_IConnectionPoint &cp);
  117.     
  118. public:
  119.     __fastcall TConnectionPoints(const _di_IUnknown Controller);
  120.     __fastcall virtual ~TConnectionPoints(void);
  121.     TConnectionPoint* __fastcall CreateConnectionPoint(const GUID &IID, TConnectionKind Kind, TConnectEvent 
  122.         OnConnect);
  123. };
  124.  
  125. class PASCALIMPLEMENTATION TConnectionPoint : public Axctrls::TContainedObject 
  126. {
  127.     typedef Axctrls::TContainedObject inherited;
  128.     
  129. private:
  130.     void *__IConnectionPoint;    /* IConnectionPoint */
  131.     
  132. public:
  133.     operator IConnectionPoint*(void) { return (IConnectionPoint*)&__IConnectionPoint; }
  134.     
  135. private:
  136.     TConnectionPoints* FContainer;
  137.     GUID FIID;
  138.     Classes::TList* FSinkList;
  139.     TConnectEvent FOnConnect;
  140.     TConnectionKind FKind;
  141.     int __fastcall AddSink(const _di_IUnknown Sink);
  142.     void __fastcall RemoveSink(int Cookie);
  143.     
  144. protected:
  145.     HRESULT __stdcall GetConnectionInterface(/* out */ GUID &iid);
  146.     HRESULT __stdcall GetConnectionPointContainer(/* out */ _di_IConnectionPointContainer &cpc);
  147.     HRESULT __stdcall Advise(const _di_IUnknown unkSink, /* out */ int &dwCookie);
  148.     HRESULT __stdcall Unadvise(int dwCookie);
  149.     HRESULT __stdcall EnumConnections(/* out */ _di_IEnumConnections &enumconn);
  150.     
  151. public:
  152.     __fastcall TConnectionPoint(TConnectionPoints* Container, const GUID &IID, TConnectionKind Kind, TConnectEvent 
  153.         OnConnect);
  154.     __fastcall virtual ~TConnectionPoint(void);
  155. };
  156.  
  157. typedef void __fastcall (__closure *TDefinePropertyPage)(const GUID &GUID);
  158.  
  159. __dispinterface IAmbientDispatch;
  160. typedef System::DelphiInterface<IAmbientDispatch> _di_IAmbientDispatch;
  161. __dispinterface IAmbientDispatch: public IDispatch /* __guid="{00020400-0000-0000-C000-000000000046}" */
  162.     
  163. {
  164.     
  165. };
  166.  
  167. class DELPHICLASS TActiveXControl;
  168. class DELPHICLASS TActiveXControlFactory;
  169. typedef System::TMetaClass*TActiveXControlClass;
  170.  
  171. class PASCALIMPLEMENTATION TActiveXControlFactory : public Comobj::TAutoObjectFactory 
  172. {
  173.     typedef Comobj::TAutoObjectFactory inherited;
  174.     
  175. private:
  176.     System::TMetaClass*FWinControlClass;
  177.     int FMiscStatus;
  178.     int FToolboxBitmapID;
  179.     _di_ITypeInfo FEventTypeInfo;
  180.     GUID FEventIID;
  181.     Classes::TStringList* FVerbs;
  182.     Classes::TStringList* FLicFileStrings;
  183.     bool FLicenseFileRead;
  184.     
  185. protected:
  186.     virtual System::AnsiString __fastcall GetLicenseFileName(void);
  187.     virtual bool __fastcall HasMachineLicense(void);
  188.     
  189. public:
  190.     __fastcall TActiveXControlFactory(Comobj::TComServerObject* ComServer, System::TMetaClass* ActiveXControlClass
  191.         , System::TMetaClass* WinControlClass, const GUID &ClassID, int ToolboxBitmapID, const System::AnsiString 
  192.         LicStr, int MiscStatus);
  193.     __fastcall virtual ~TActiveXControlFactory(void);
  194.     void __fastcall AddVerb(int Verb, const System::AnsiString VerbName);
  195.     virtual void __fastcall UpdateRegistry(bool Register);
  196.     __property GUID EventIID = {read=FEventIID};
  197.     __property _di_ITypeInfo EventTypeInfo = {read=FEventTypeInfo};
  198.     __property int MiscStatus = {read=FMiscStatus, nodefault};
  199.     __property int ToolboxBitmapID = {read=FToolboxBitmapID, nodefault};
  200.     __property System::TMetaClass* WinControlClass = {read=FWinControlClass};
  201. };
  202.  
  203. class PASCALIMPLEMENTATION TActiveXControl : public Comobj::TAutoObject 
  204. {
  205.     typedef Comobj::TAutoObject inherited;
  206.     
  207. private:
  208.     void *__IPersistPropertyBag;    /* IPersistPropertyBag [Save=PersistPropBagSave, Load=PersistPropBagLoad, 
  209.         InitNew=PersistPropBagInitNew] */
  210.     void *__IPersistStreamInit;    /* IPersistStreamInit [Save=PersistStreamSave, Load=PersistStreamLoad] 
  211.         */
  212.     void *__IPersistStorage;    /* IPersistStorage [Save=PersistStorageSave, Load=PersistStorageLoad, InitNew=PersistStorageInitNew
  213.         ] */
  214.     void *__IObjectSafety;    /* IObjectSafety */
  215.     void *__IOleObject;    /* IOleObject */
  216.     void *__IOleControl;    /* IOleControl */
  217.     void *__IOleInPlaceObject;    /* IOleInPlaceObject */
  218.     void *__IOleInPlaceActiveObject;    /* IOleInPlaceActiveObject */
  219.     void *__IViewObject;    /* IViewObject */
  220.     void *__IViewObject2;    /* IViewObject2 [GetExtent=ViewObjectGetExtent] */
  221.     void *__IPerPropertyBrowsing;    /* IPerPropertyBrowsing */
  222.     void *__ISpecifyPropertyPages;    /* ISpecifyPropertyPages */
  223.     void *__ISimpleFrameSite;    /* ISimpleFrameSite */
  224.     
  225. public:
  226.     operator ISimpleFrameSite*(void) { return (ISimpleFrameSite*)&__ISimpleFrameSite; }
  227.     operator ISpecifyPropertyPages*(void) { return (ISpecifyPropertyPages*)&__ISpecifyPropertyPages; }
  228.     operator IPerPropertyBrowsing*(void) { return (IPerPropertyBrowsing*)&__IPerPropertyBrowsing; }
  229.     operator IViewObject2*(void) { return (IViewObject2*)&__IViewObject2; }
  230.     operator IViewObject*(void) { return (IViewObject*)&__IViewObject; }
  231.     operator IOleInPlaceActiveObject*(void) { return (IOleInPlaceActiveObject*)&__IOleInPlaceActiveObject; }
  232.         
  233.     operator IOleInPlaceObject*(void) { return (IOleInPlaceObject*)&__IOleInPlaceObject; }
  234.     operator IOleControl*(void) { return (IOleControl*)&__IOleControl; }
  235.     operator IOleObject*(void) { return (IOleObject*)&__IOleObject; }
  236.     operator IObjectSafety*(void) { return (IObjectSafety*)&__IObjectSafety; }
  237.     operator IPersistStorage*(void) { return (IPersistStorage*)&__IPersistStorage; }
  238.     operator IPersistStreamInit*(void) { return (IPersistStreamInit*)&__IPersistStreamInit; }
  239.     operator IPersistPropertyBag*(void) { return (IPersistPropertyBag*)&__IPersistPropertyBag; }
  240.     
  241. private:
  242.     TActiveXControlFactory* FControlFactory;
  243.     TConnectionPoints* FConnectionPoints;
  244.     _di_IUnknown FEventSink;
  245.     TConnectionPoint* FPropertySinks;
  246.     int FObjectSafetyFlags;
  247.     _di_IOleClientSite FOleClientSite;
  248.     _di_IOleControlSite FOleControlSite;
  249.     _di_ISimpleFrameSite FSimpleFrameSite;
  250.     _di_IAmbientDispatch FAmbientDispatch;
  251.     _di_IOleInPlaceSite FOleInPlaceSite;
  252.     _di_IOleInPlaceFrame FOleInPlaceFrame;
  253.     _di_IOleInPlaceUIWindow FOleInPlaceUIWindow;
  254.     _di_IOleAdviseHolder FOleAdviseHolder;
  255.     _di_IAdviseSink FAdviseSink;
  256.     int FAdviseFlags;
  257.     Controls::TWinControl* FControl;
  258.     Controls::TWndMethod FControlWndProc;
  259.     Controls::TWinControl* FWinControl;
  260.     bool FIsDirty;
  261.     bool FInPlaceActive;
  262.     bool FUIActive;
  263.     bool FEventsFrozen;
  264.     HRESULT __fastcall CreateAdviseHolder(void);
  265.     void __fastcall EventConnect(const _di_IUnknown Sink, bool Connecting);
  266.     int __fastcall GetPropertyID(const System::WideString PropertyName);
  267.     void __fastcall RecreateWnd(void);
  268.     void __fastcall ViewChanged(void);
  269.     
  270. protected:
  271.     HRESULT __stdcall GetClassID(/* out */ GUID &classID);
  272.     HRESULT __stdcall PersistPropBagInitNew(void);
  273.     HRESULT __stdcall PersistPropBagLoad(const _di_IPropertyBag pPropBag, const _di_IErrorLog pErrorLog
  274.         );
  275.     HRESULT __stdcall PersistPropBagSave(const _di_IPropertyBag pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties
  276.         );
  277.     HRESULT __stdcall IsDirty(void);
  278.     HRESULT __stdcall PersistStreamLoad(const _di_IStream stm);
  279.     HRESULT __stdcall PersistStreamSave(const _di_IStream stm, BOOL fClearDirty);
  280.     HRESULT __stdcall GetSizeMax(/* out */ System::Comp &cbSize);
  281.     HRESULT __stdcall InitNew(void);
  282.     HRESULT __stdcall PersistStorageInitNew(const _di_IStorage stg);
  283.     HRESULT __stdcall PersistStorageLoad(const _di_IStorage stg);
  284.     HRESULT __stdcall PersistStorageSave(const _di_IStorage stgSave, BOOL fSameAsLoad);
  285.     HRESULT __stdcall SaveCompleted(const _di_IStorage stgNew);
  286.     HRESULT __stdcall HandsOffStorage(void);
  287.     virtual HRESULT __stdcall GetInterfaceSafetyOptions(const GUID &IID, PDWORD pdwSupportedOptions, PDWORD 
  288.         pdwEnabledOptions);
  289.     virtual HRESULT __stdcall SetInterfaceSafetyOptions(const GUID &IID, int dwOptionSetMask, int dwEnabledOptions
  290.         );
  291.     HRESULT __stdcall SetClientSite(const _di_IOleClientSite clientSite);
  292.     HRESULT __stdcall GetClientSite(/* out */ _di_IOleClientSite &clientSite);
  293.     HRESULT __stdcall SetHostNames(wchar_t * szContainerApp, wchar_t * szContainerObj);
  294.     HRESULT __stdcall Close(int dwSaveOption);
  295.     HRESULT __stdcall SetMoniker(int dwWhichMoniker, const _di_IMoniker mk);
  296.     HRESULT __stdcall GetMoniker(int dwAssign, int dwWhichMoniker, /* out */ _di_IMoniker &mk);
  297.     HRESULT __stdcall InitFromData(const _di_IDataObject dataObject, BOOL fCreation, int dwReserved);
  298.     HRESULT __stdcall GetClipboardData(int dwReserved, /* out */ _di_IDataObject &dataObject);
  299.     HRESULT __stdcall DoVerb(int iVerb, Windows::PMsg msg, const _di_IOleClientSite activeSite, int lindex
  300.         , HWND hwndParent, const Windows::TRect &posRect);
  301.     HRESULT __stdcall EnumVerbs(/* out */ _di_IEnumOLEVERB &enumOleVerb);
  302.     HRESULT __stdcall Update(void);
  303.     HRESULT __stdcall IsUpToDate(void);
  304.     HRESULT __stdcall GetUserClassID(/* out */ GUID &clsid);
  305.     HRESULT __stdcall GetUserType(int dwFormOfType, /* out */ wchar_t * &pszUserType);
  306.     HRESULT __stdcall SetExtent(int dwDrawAspect, const tagPOINT &size);
  307.     HRESULT __stdcall GetExtent(int dwDrawAspect, /* out */ tagPOINT &size);
  308.     HRESULT __stdcall Advise(const _di_IAdviseSink advSink, /* out */ int &dwConnection);
  309.     HRESULT __stdcall Unadvise(int dwConnection);
  310.     HRESULT __stdcall EnumAdvise(/* out */ _di_IEnumSTATDATA &enumAdvise);
  311.     HRESULT __stdcall GetMiscStatus(int dwAspect, /* out */ int &dwStatus);
  312.     HRESULT __stdcall SetColorScheme(const tagLOGPALETTE &logpal);
  313.     HRESULT __stdcall GetControlInfo(tagCONTROLINFO &ci);
  314.     HRESULT __stdcall OnMnemonic(Windows::PMsg msg);
  315.     HRESULT __stdcall OnAmbientPropertyChange(int dispid);
  316.     HRESULT __stdcall FreezeEvents(BOOL bFreeze);
  317.     HRESULT __stdcall GetWindow(/* out */ HWND &wnd);
  318.     HRESULT __stdcall ContextSensitiveHelp(BOOL fEnterMode);
  319.     HRESULT __stdcall InPlaceDeactivate(void);
  320.     HRESULT __stdcall UIDeactivate(void);
  321.     HRESULT __stdcall SetObjectRects(const Windows::TRect &rcPosRect, const Windows::TRect &rcClipRect)
  322.         ;
  323.     HRESULT __stdcall ReactivateAndUndo(void);
  324.     HRESULT __stdcall TranslateAccelerator(tagMSG &msg);
  325.     HRESULT __stdcall OnFrameWindowActivate(BOOL fActivate);
  326.     HRESULT __stdcall OnDocWindowActivate(BOOL fActivate);
  327.     HRESULT __stdcall ResizeBorder(const Windows::TRect &rcBorder, const _di_IOleInPlaceUIWindow uiWindow
  328.         , BOOL fFrameWindow);
  329.     HRESULT __stdcall EnableModeless(BOOL fEnable);
  330.     HRESULT __stdcall Draw(int dwDrawAspect, int lindex, void * pvAspect, Activex::PDVTargetDevice ptd, 
  331.         HDC hicTargetDev, HDC hdcDraw, Windows::PRect prcBounds, Windows::PRect prcWBounds, Activex::TContinueFunc 
  332.         fnContinue, int dwContinue);
  333.     HRESULT __stdcall GetColorSet(int dwDrawAspect, int lindex, void * pvAspect, Activex::PDVTargetDevice 
  334.         ptd, HDC hicTargetDev, /* out */ Windows::PLogPalette &colorSet);
  335.     HRESULT __stdcall Freeze(int dwDrawAspect, int lindex, void * pvAspect, /* out */ int &dwFreeze);
  336.     HRESULT __stdcall Unfreeze(int dwFreeze);
  337.     HRESULT __stdcall SetAdvise(int aspects, int advf, const _di_IAdviseSink advSink);
  338.     HRESULT __stdcall GetAdvise(Windows::PLongint pAspects, Windows::PLongint pAdvf, /* out */ _di_IAdviseSink 
  339.         &advSink);
  340.     HRESULT __stdcall ViewObjectGetExtent(int dwDrawAspect, int lindex, Activex::PDVTargetDevice ptd, /* out */ 
  341.         tagPOINT &size);
  342.     HRESULT __stdcall GetDisplayString(int dispid, /* out */ System::WideString &bstr);
  343.     HRESULT __stdcall MapPropertyToPage(int dispid, /* out */ GUID &clsid);
  344.     HRESULT __stdcall GetPredefinedStrings(int dispid, /* out */ tagCALPOLESTR &caStringsOut, /* out */ 
  345.         tagCADWORD &caCookiesOut);
  346.     HRESULT __stdcall GetPredefinedValue(int dispid, int dwCookie, /* out */ System::OleVariant &varOut
  347.         );
  348.     HRESULT __stdcall GetPages(/* out */ tagCAUUID &pages);
  349.     HRESULT __stdcall PreMessageFilter(HWND wnd, int msg, int wp, int lp, /* out */ int &res, /* out */ 
  350.         int &Cookie);
  351.     HRESULT __stdcall PostMessageFilter(HWND wnd, int msg, int wp, int lp, /* out */ int &res, int Cookie
  352.         );
  353.     HRESULT __safecall Get_BackColor(int &Get_BackColor_result);
  354.     HRESULT __safecall Get_Caption(System::WideString &Get_Caption_result);
  355.     HRESULT __safecall Get_Enabled(Word &Get_Enabled_result);
  356.     HRESULT __safecall Get_Font(_di_IFontDisp &Get_Font_result);
  357.     HRESULT __safecall Get_ForeColor(int &Get_ForeColor_result);
  358.     HRESULT __safecall Get_HWnd(int &Get_HWnd_result);
  359.     HRESULT __safecall Get_TabStop(Word &Get_TabStop_result);
  360.     HRESULT __safecall Get_Text(System::WideString &Get_Text_result);
  361.     HRESULT __safecall Set_BackColor(int Value);
  362.     HRESULT __safecall Set_Caption(const System::WideString Value);
  363.     HRESULT __safecall Set_Enabled(Word Value);
  364.     HRESULT __safecall Set_Font(const _di_IFontDisp Value);
  365.     HRESULT __safecall Set_ForeColor(int Value);
  366.     HRESULT __safecall Set_TabStop(Word Value);
  367.     HRESULT __safecall Set_Text(const System::WideString Value);
  368.     void __fastcall StdClickEvent(System::TObject* Sender);
  369.     void __fastcall StdDblClickEvent(System::TObject* Sender);
  370.     void __fastcall StdKeyDownEvent(System::TObject* Sender, Word &Key, Classes::TShiftState Shift);
  371.     void __fastcall StdKeyPressEvent(System::TObject* Sender, char &Key);
  372.     void __fastcall StdKeyUpEvent(System::TObject* Sender, Word &Key, Classes::TShiftState Shift);
  373.     void __fastcall StdMouseDownEvent(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState 
  374.         Shift, int X, int Y);
  375.     void __fastcall StdMouseMoveEvent(System::TObject* Sender, Classes::TShiftState Shift, int X, int Y
  376.         );
  377.     void __fastcall StdMouseUpEvent(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState 
  378.         Shift, int X, int Y);
  379.     HRESULT __fastcall InPlaceActivate(bool ActivateUI);
  380.     void __fastcall ShowPropertyDialog(void);
  381.     virtual void __fastcall DefinePropertyPages(TDefinePropertyPage DefinePropertyPage);
  382.     virtual void __fastcall EventSinkChanged(const _di_IUnknown EventSink);
  383.     virtual bool __fastcall GetPropertyString(int DispID, System::AnsiString &S);
  384.     virtual bool __fastcall GetPropertyStrings(int DispID, Classes::TStrings* Strings);
  385.     virtual void __fastcall GetPropertyValue(int DispID, int Cookie, System::OleVariant &Value);
  386.     virtual void __fastcall GetPropFromBag(const System::WideString PropName, int DispatchID, _di_IPropertyBag 
  387.         PropBag, _di_IErrorLog ErrorLog);
  388.     virtual void __fastcall InitializeControl(void);
  389.     virtual void __fastcall LoadFromStream(const _di_IStream Stream);
  390.     virtual void __fastcall PerformVerb(int Verb);
  391.     virtual void __fastcall PutPropInBag(const System::WideString PropName, int DispatchID, _di_IPropertyBag 
  392.         PropBag);
  393.     virtual void __fastcall SaveToStream(const _di_IStream Stream);
  394.     virtual void __fastcall WndProc(Messages::TMessage &Message);
  395.     
  396. public:
  397.     __fastcall virtual ~TActiveXControl(void);
  398.     virtual void __fastcall Initialize(void);
  399.     virtual HRESULT __stdcall ObjQueryInterface(const GUID &IID, /* out */ void *Obj);
  400.     bool __fastcall PropRequestEdit(const System::WideString PropertyName);
  401.     void __fastcall PropChanged(const System::WideString PropertyName);
  402.     __property Controls::TWinControl* Control = {read=FControl};
  403. public:
  404.     /* TComObject.Create */ __fastcall TActiveXControl(void) : Comobj::TAutoObject() { }
  405.     /* TComObject.CreateAggregated */ __fastcall TActiveXControl(const _di_IUnknown Controller) : Comobj::
  406.         TAutoObject(Controller) { }
  407.     /* TComObject.CreateFromFactory */ __fastcall TActiveXControl(Comobj::TComObjectFactory* Factory, const 
  408.         _di_IUnknown Controller) : Comobj::TAutoObject(Factory, Controller) { }
  409.     
  410. };
  411.  
  412. class DELPHICLASS TPropertyPage;
  413. class DELPHICLASS TPropertyPageImpl;
  414. class PASCALIMPLEMENTATION TPropertyPageImpl : public Axctrls::TAggregatedObject 
  415. {
  416.     typedef Axctrls::TAggregatedObject inherited;
  417.     
  418. private:
  419.     void *__IUnknown;    /* IUnknown */
  420.     void *__IPropertyPage;    /* IPropertyPage */
  421.     void *__IPropertyPage2;    /* IPropertyPage2 */
  422.     
  423. public:
  424.     operator IPropertyPage2*(void) { return (IPropertyPage2*)&__IPropertyPage2; }
  425.     operator IPropertyPage*(void) { return (IPropertyPage*)&__IPropertyPage; }
  426.     operator IUnknown*(void) { return (IUnknown*)&__IUnknown; }
  427.     
  428. private:
  429.     TPropertyPage* FPropertyPage;
  430.     _di_IPropertyPageSite FPageSite;
  431.     bool FActive;
  432.     bool FModified;
  433.     void __fastcall Modified(void);
  434.     
  435. protected:
  436.     HIDESBASE HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);
  437.     HRESULT __stdcall SetPageSite(const _di_IPropertyPageSite pageSite);
  438.     HRESULT __stdcall Activate(HWND hwndParent, const Windows::TRect &rc, BOOL bModal);
  439.     HRESULT __stdcall Deactivate(void);
  440.     HRESULT __stdcall GetPageInfo(/* out */ tagPROPPAGEINFO &pageInfo);
  441.     HRESULT __stdcall SetObjects(int cObjects, Activex::PUnknownList pUnkList);
  442.     HRESULT __stdcall Show(int nCmdShow);
  443.     HRESULT __stdcall Move(const Windows::TRect &rect);
  444.     HRESULT __stdcall IsPageDirty(void);
  445.     HRESULT __stdcall Apply(void);
  446.     HRESULT __stdcall Help(wchar_t * pszHelpDir);
  447.     HRESULT __stdcall TranslateAccelerator(Windows::PMsg msg);
  448.     HRESULT __stdcall EditProperty(int dispid);
  449.     
  450. public:
  451.     virtual void __fastcall InitPropertyPage(void);
  452.     __property TPropertyPage* PropertyPage = {read=FPropertyPage, write=FPropertyPage};
  453. public:
  454.     /* TAggregatedObject.Create */ __fastcall TPropertyPageImpl(_di_IUnknown Controller) : Axctrls::TAggregatedObject(
  455.         Controller) { }
  456.     
  457. public:
  458.     /* TObject.Destroy */ __fastcall virtual ~TPropertyPageImpl(void) { }
  459.     
  460. };
  461.  
  462. class PASCALIMPLEMENTATION TPropertyPage : public Forms::TCustomForm 
  463. {
  464.     typedef Forms::TCustomForm inherited;
  465.     
  466. private:
  467.     TPropertyPageImpl* FActiveXPropertyPage;
  468.     System::OleVariant FOleObject;
  469.     Classes::TInterfaceList* FOleObjects;
  470.     HIDESBASE MESSAGE void __fastcall CMChanged(Controls::TCMChanged &Msg);
  471.     
  472. public:
  473.     __fastcall virtual TPropertyPage(Classes::TComponent* AOwner);
  474.     __fastcall virtual ~TPropertyPage(void);
  475.     void __fastcall Modified(void);
  476.     virtual void __fastcall UpdateObject(void);
  477.     virtual void __fastcall UpdatePropertyPage(void);
  478.     __property System::OleVariant OleObject = {read=FOleObject};
  479.     __property Classes::TInterfaceList* OleObjects = {read=FOleObjects, write=FOleObjects};
  480.     void __fastcall EnumCtlProps(const GUID &PropType, Classes::TStrings* PropNames);
  481.     
  482. __published:
  483.     __property ActiveControl ;
  484.     __property AutoScroll ;
  485.     __property Caption ;
  486.     __property ClientHeight ;
  487.     __property ClientWidth ;
  488.     __property Ctl3D ;
  489.     __property Color ;
  490.     __property Enabled ;
  491.     __property Font ;
  492.     __property Height ;
  493.     __property HorzScrollBar ;
  494.     __property KeyPreview ;
  495.     __property PixelsPerInch ;
  496.     __property ParentFont ;
  497.     __property PopupMenu ;
  498.     __property PrintScale ;
  499.     __property Scaled ;
  500.     __property ShowHint ;
  501.     __property VertScrollBar ;
  502.     __property Visible ;
  503.     __property Width ;
  504.     __property OnActivate ;
  505.     __property OnClick ;
  506.     __property OnClose ;
  507.     __property OnCreate ;
  508.     __property OnDblClick ;
  509.     __property OnDestroy ;
  510.     __property OnDeactivate ;
  511.     __property OnDragDrop ;
  512.     __property OnDragOver ;
  513.     __property OnHide ;
  514.     __property OnKeyDown ;
  515.     __property OnKeyPress ;
  516.     __property OnKeyUp ;
  517.     __property OnMouseDown ;
  518.     __property OnMouseMove ;
  519.     __property OnMouseUp ;
  520.     __property OnPaint ;
  521.     __property OnResize ;
  522.     __property OnShow ;
  523. public:
  524.     /* TCustomForm.CreateNew */ __fastcall TPropertyPage(Classes::TComponent* AOwner, int Dummy) : Forms::
  525.         TCustomForm(AOwner, Dummy) { }
  526.     
  527. public:
  528.     /* TWinControl.CreateParented */ __fastcall TPropertyPage(HWND ParentWindow) : Forms::TCustomForm(ParentWindow
  529.         ) { }
  530.     
  531. };
  532.  
  533. typedef System::TMetaClass*TPropertyPageClass;
  534.  
  535. class DELPHICLASS TCustomAdapter;
  536. class PASCALIMPLEMENTATION TCustomAdapter : public System::TInterfacedObject 
  537. {
  538.     typedef System::TInterfacedObject inherited;
  539.     
  540. private:
  541.     _di_IUnknown FOleObject;
  542.     int FConnection;
  543.     _di_IUnknown FNotifier;
  544.     
  545. protected:
  546.     bool Updating;
  547.     virtual void __fastcall Changed(void);
  548.     void __fastcall ConnectOleObject(_di_IUnknown OleObject);
  549.     void __fastcall ReleaseOleObject(void);
  550.     virtual void __fastcall Update(void) = 0;
  551.     
  552. public:
  553.     __fastcall TCustomAdapter(void);
  554.     __fastcall virtual ~TCustomAdapter(void);
  555. };
  556.  
  557. class DELPHICLASS TAdapterNotifier;
  558. class PASCALIMPLEMENTATION TAdapterNotifier : public System::TInterfacedObject 
  559. {
  560.     typedef System::TInterfacedObject inherited;
  561.     
  562. private:
  563.     void *__IPropertyNotifySink;    /* IPropertyNotifySink */
  564.     
  565. public:
  566.     operator IPropertyNotifySink*(void) { return (IPropertyNotifySink*)&__IPropertyNotifySink; }
  567.     
  568. private:
  569.     TCustomAdapter* FAdapter;
  570.     
  571. protected:
  572.     HRESULT __stdcall OnChanged(int dispid);
  573.     HRESULT __stdcall OnRequestEdit(int dispid);
  574.     
  575. public:
  576.     __fastcall TAdapterNotifier(TCustomAdapter* Adapter);
  577. public:
  578.     /* TInterfacedObject.Destroy */ __fastcall virtual ~TAdapterNotifier(void) { }
  579.     
  580. };
  581.  
  582. __interface IFontAccess;
  583. typedef System::DelphiInterface<IFontAccess> _di_IFontAccess;
  584. __interface IFontAccess : public IUnknown /* __guid="{CBA55CA0-0E57-11D0-BD2F-0020AF0E5B81}" */
  585. {
  586.     
  587. public:
  588.     virtual void __fastcall GetOleFont(_di_IFontDisp &OleFont) = 0;
  589.     virtual void __fastcall SetOleFont(const _di_IFontDisp OleFont) = 0;
  590. };
  591.  
  592. class DELPHICLASS TFontAdapter;
  593. class PASCALIMPLEMENTATION TFontAdapter : public Axctrls::TCustomAdapter 
  594. {
  595.     typedef Axctrls::TCustomAdapter inherited;
  596.     
  597. private:
  598.     void *__IChangeNotifier;    /* Graphics::IChangeNotifier */
  599.     void *__IFontAccess;    /* Axctrls::IFontAccess */
  600.     
  601. public:
  602.     operator IFontAccess*(void) { return (IFontAccess*)&__IFontAccess; }
  603.     operator IChangeNotifier*(void) { return (IChangeNotifier*)&__IChangeNotifier; }
  604.     
  605. private:
  606.     Graphics::TFont* FFont;
  607.     
  608. protected:
  609.     void __fastcall GetOleFont(_di_IFontDisp &OleFont);
  610.     void __fastcall SetOleFont(const _di_IFontDisp OleFont);
  611.     virtual void __fastcall Changed(void);
  612.     virtual void __fastcall Update(void);
  613.     
  614. public:
  615.     __fastcall TFontAdapter(Graphics::TFont* Font);
  616. public:
  617.     /* TCustomAdapter.Destroy */ __fastcall virtual ~TFontAdapter(void) { }
  618.     
  619. };
  620.  
  621. __interface IPictureAccess;
  622. typedef System::DelphiInterface<IPictureAccess> _di_IPictureAccess;
  623. __interface IPictureAccess : public IUnknown /* __guid="{795D4D31-43D7-11D0-9E92-0020AF3D82DA}" */
  624. {
  625.     
  626. public:
  627.     virtual void __fastcall GetOlePicture(_di_IPictureDisp &OlePicture) = 0;
  628.     virtual void __fastcall SetOlePicture(const _di_IPictureDisp OlePicture) = 0;
  629. };
  630.  
  631. class DELPHICLASS TPictureAdapter;
  632. class PASCALIMPLEMENTATION TPictureAdapter : public Axctrls::TCustomAdapter 
  633. {
  634.     typedef Axctrls::TCustomAdapter inherited;
  635.     
  636. private:
  637.     void *__IChangeNotifier;    /* Graphics::IChangeNotifier */
  638.     void *__IPictureAccess;    /* Axctrls::IPictureAccess */
  639.     
  640. public:
  641.     operator IPictureAccess*(void) { return (IPictureAccess*)&__IPictureAccess; }
  642.     operator IChangeNotifier*(void) { return (IChangeNotifier*)&__IChangeNotifier; }
  643.     
  644. private:
  645.     Graphics::TPicture* FPicture;
  646.     
  647. protected:
  648.     void __fastcall GetOlePicture(_di_IPictureDisp &OlePicture);
  649.     void __fastcall SetOlePicture(const _di_IPictureDisp OlePicture);
  650.     virtual void __fastcall Update(void);
  651.     
  652. public:
  653.     __fastcall TPictureAdapter(Graphics::TPicture* Picture);
  654. public:
  655.     /* TCustomAdapter.Destroy */ __fastcall virtual ~TPictureAdapter(void) { }
  656.     
  657. };
  658.  
  659. class DELPHICLASS TOleGraphic;
  660. class PASCALIMPLEMENTATION TOleGraphic : public Graphics::TGraphic 
  661. {
  662.     typedef Graphics::TGraphic inherited;
  663.     
  664. private:
  665.     _di_IPicture FPicture;
  666.     int __fastcall GetMMHeight(void);
  667.     int __fastcall GetMMWidth(void);
  668.     
  669. protected:
  670.     virtual void __fastcall Changed(System::TObject* Sender);
  671.     virtual void __fastcall Draw(Graphics::TCanvas* ACanvas, const Windows::TRect &Rect);
  672.     virtual bool __fastcall GetEmpty(void);
  673.     virtual int __fastcall GetHeight(void);
  674.     virtual HPALETTE __fastcall GetPalette(void);
  675.     virtual bool __fastcall GetTransparent(void);
  676.     virtual int __fastcall GetWidth(void);
  677.     virtual void __fastcall SetHeight(int Value);
  678.     virtual void __fastcall SetPalette(HPALETTE Value);
  679.     virtual void __fastcall SetWidth(int Value);
  680.     
  681. public:
  682.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  683.     virtual void __fastcall LoadFromFile(const System::AnsiString Filename);
  684.     virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
  685.     virtual void __fastcall SaveToStream(Classes::TStream* Stream);
  686.     virtual void __fastcall LoadFromClipboardFormat(Word AFormat, int AData, HPALETTE APalette);
  687.     virtual void __fastcall SaveToClipboardFormat(Word &AFormat, int &AData, HPALETTE &APalette);
  688.     __property int MMHeight = {read=GetMMHeight, nodefault};
  689.     __property int MMWidth = {read=GetMMWidth, nodefault};
  690.     __property _di_IPicture Picture = {read=FPicture, write=FPicture};
  691. protected:
  692.     /* TGraphic.Create */ __fastcall virtual TOleGraphic(void) : Graphics::TGraphic() { }
  693.     
  694. public:
  695.     /* TPersistent.Destroy */ __fastcall virtual ~TOleGraphic(void) { }
  696.     
  697. };
  698.  
  699. class DELPHICLASS TStringsAdapter;
  700. class PASCALIMPLEMENTATION TStringsAdapter : public Comobj::TAutoIntfObject 
  701. {
  702.     typedef Comobj::TAutoIntfObject inherited;
  703.     
  704. private:
  705.     void *__IStrings;    /* Stdvcl::IStrings */
  706.     void *__IStringsAdapter;    /* Classes::IStringsAdapter */
  707.     
  708. public:
  709.     operator IStringsAdapter*(void) { return (IStringsAdapter*)&__IStringsAdapter; }
  710.     operator IStrings*(void) { return (IStrings*)&__IStrings; }
  711.     
  712. private:
  713.     Classes::TStrings* FStrings;
  714.     
  715. protected:
  716.     void __fastcall ReferenceStrings(Classes::TStrings* S);
  717.     void __fastcall ReleaseStrings(void);
  718.     HRESULT __safecall Get_ControlDefault(int Index, System::OleVariant &Get_ControlDefault_result);
  719.     HRESULT __safecall Set_ControlDefault(int Index, const System::OleVariant Value);
  720.     HRESULT __safecall Count(int &Count_result);
  721.     HRESULT __safecall Get_Item(int Index, System::OleVariant &Get_Item_result);
  722.     HRESULT __safecall Set_Item(int Index, const System::OleVariant Value);
  723.     HRESULT __safecall Remove(int Index);
  724.     HRESULT __safecall Clear(void);
  725.     HRESULT __safecall Add(const System::OleVariant Item, int &Add_result);
  726.     HRESULT __safecall _NewEnum(_di_IUnknown &_NewEnum_result);
  727.     
  728. public:
  729.     __fastcall TStringsAdapter(Classes::TStrings* Strings);
  730. public:
  731.     /* TInterfacedObject.Destroy */ __fastcall virtual ~TStringsAdapter(void) { }
  732.     
  733. };
  734.  
  735. class DELPHICLASS TReflectorWindow;
  736. class PASCALIMPLEMENTATION TReflectorWindow : public Controls::TWinControl 
  737. {
  738.     typedef Controls::TWinControl inherited;
  739.     
  740. private:
  741.     Controls::TControl* FControl;
  742.     bool FInSize;
  743.     MESSAGE void __fastcall WMGetDlgCode(Messages::TMessage &Message);
  744.     HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
  745.     HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
  746.     
  747. public:
  748.     __fastcall TReflectorWindow(int ParentWindow, Controls::TControl* Control);
  749. public:
  750.     /* TWinControl.CreateParented */ __fastcall TReflectorWindow(HWND ParentWindow) : Controls::TWinControl(
  751.         ParentWindow) { }
  752.     /* TWinControl.Destroy */ __fastcall virtual ~TReflectorWindow(void) { }
  753.     
  754. };
  755.  
  756. //-- var, const, procedure ---------------------------------------------------
  757. extern PACKAGE GUID Class_DColorPropPage;
  758. extern PACKAGE GUID Class_DFontPropPage;
  759. extern PACKAGE GUID Class_DPicturePropPage;
  760. extern PACKAGE GUID Class_DStringPropPage;
  761. extern PACKAGE HWND __fastcall ParkingWindow(void);
  762. extern PACKAGE System::OleVariant __fastcall GetDispatchPropValue(_di_IDispatch Disp, int DispID);
  763. extern PACKAGE void __fastcall SetDispatchPropValue(_di_IDispatch Disp, int DispID, const System::OleVariant 
  764.     &Value);
  765. extern PACKAGE void __fastcall EnumDispatchProperties(_di_IDispatch Dispatch, const GUID &PropType, 
  766.     int VTCode, Classes::TStrings* PropList);
  767. extern PACKAGE void __fastcall GetOleFont(Graphics::TFont* Font, _di_IFontDisp &OleFont);
  768. extern PACKAGE void __fastcall SetOleFont(Graphics::TFont* Font, _di_IFontDisp OleFont);
  769. extern PACKAGE void __fastcall GetOlePicture(Graphics::TPicture* Picture, _di_IPictureDisp &OlePicture
  770.     );
  771. extern PACKAGE void __fastcall SetOlePicture(Graphics::TPicture* Picture, _di_IPictureDisp OlePicture
  772.     );
  773. extern PACKAGE void __fastcall GetOleStrings(Classes::TStrings* Strings, Stdvcl::_di_IStrings &OleStrings
  774.     );
  775. extern PACKAGE void __fastcall SetOleStrings(Classes::TStrings* Strings, Stdvcl::_di_IStrings OleStrings
  776.     );
  777.  
  778. }    /* namespace Axctrls */
  779. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  780. using namespace Axctrls;
  781. #endif
  782. //-- end unit ----------------------------------------------------------------
  783. #endif    // AxCtrls
  784.